<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编辑电影</title>
  <link rel="stylesheet" href="../../static/css/style.css">
  <script src="/static/script/jquery-1.7.2.js"></script>
  <script>
    $(function () {
      $("#return_filmManager").click(function (){
        location = "/filmManage";
      });
    });
  </script>
</head>
<body>
  <div id="login_page">
    <div class="logo" style="color: #39987c;">编辑电影</div>
    <div id="content_exit">
      <form action="/saveFilm" method="post" id="exit">
        {{if .}}
        <table class="exit_table">
          <tr>
            <td>名称：</td>
            <td><input type="text" name="filmName" value="{{.FilmName}}"/></td>
            <td>类型：</td>
            <td><input type="text" name="filmType" value="{{.FilmType}}"/></td>
          </tr>
          <tr>
            <td>时长：</td>
            <td><input type="text" name="duration" value="{{.Duration}}"/></td>
            <td>价格：</td>
            <td><input type="text" name="price" value="{{.Price}}"/></td>
          </tr>
          <tr>
            <td>销量：</td>
            <td><input type="text" name="sales" value="{{.Sales}}"/></td>
            <td>票房：</td>
            <td><input type="text" name="ticketOffice" value="{{.TicketOffice}}"/></td>
          </tr>
          <tr>
            <td>区域：</td>
            <td><input type="text" name="zone" value="{{.Zone}}"/></td>
            <td>状态：</td>
            <td><select name="state"/>
              <option value="0">正在热映</option>
              <option value="1">即将上映</option>
              <option value="-1">已下架</option>
            </td>
          </tr>
          <tr>
            <td>上映日期：</td>
            <td><input type="text" name="screenDate" value="{{.ScreenDate}}"/></td>
            <td>下映日期：</td>
            <td><input type="text" name="offlineDate" value="{{.OfflineDate}}"/></td>
          </tr>
        </table>
        {{else}}
        <table class="exit_table">
          <tr>
            <td>名称：</td>
            <td><input type="text" name="filmName" value=""/></td>
            <td>类型：</td>
            <td><input type="text" name="filmType" value=""/></td>
          </tr>
          <tr>
            <td>时长：</td>
            <td><input type="text" name="duration" value=""/></td>
            <td>价格：</td>
            <td><input type="text" name="price" value=""/></td>
          </tr>
          <tr>
            <td>销量：</td>
            <td><input type="text" name="sales" value=""/></td>
            <td>票房：</td>
            <td><input type="text" name="ticketOffice" value=""/></td>
          </tr>
          <tr>
            <td>区域：</td>
            <td><input type="text" name="zone" value=""/></td>
            <td>状态：</td>
            <td><select name="state"/>
              <option value="0">正在热映</option>
              <option value="1">即将上映</option>
              <option value="-1">已下架</option>
            </td>
          </tr>
          <tr>
            <td>上映日期：</td>
            <td><input type="date" name="screenDate"/></td>
            <td>下映日期：</td>
            <td><input type="date" name="offlineDate"/></td>
          </tr>
        </table>
        {{end}}
        <input type="button" value="返回" id="return_filmManager">
        <input type="submit" value="确定" id="add_sub">
      </form>
    </div>
  </div>
</body>
</html>